﻿using System.Web;
using System.Text;
using System.IO;
using System.Net;
using System;
using System.Collections.Generic;

/// <summary>
/// 类名：Config
/// 功能：基础配置类
/// 详细：设置帐户有关信息及返回路径
/// 版本：3.4
/// 修改日期：2016-03-08
/// 说明：
/// 以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
/// 该代码仅供学习和研究支付宝接口使用，只是提供一个参考。
/// </summary>
public class Config
{

    //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 合作身份者ID，签约账号，以2088开头由16位纯数字组成的字符串，查看地址：https://b.alipay.com/order/pidAndKey.htm
    public static string partner = "2088521485855960";

    // 收款支付宝账号，以2088开头由16位纯数字组成的字符串，一般情况下收款账号就是签约账号
    public static string seller_id = partner;

    public static string APPID = "2017020905579031";

    //商户的私钥,原始格式，RSA公私钥生成：https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.nBDxfy&treeId=58&articleId=103242&docType=1
    public static string private_key = "MIICXQIBAAKBgQDMB1mCJkk3aph+KpJYPtUTX9gRVw0dCO7/HHP0WjTJT7FvEbSbszeZo8h0xQ1qyEx3F8rJPu4zVC7jTXBLojf2v8vobb/DrLIuWLbq0PjiSlnoJayy8wz46EYoL6C28pCZZmPwdMzdjATMDokgbpovR4qpW0XiCDVYUO+5xilmJwIDAQABAoGAacoByi8J1ZcKvJhcSy9BEgunH86QORbRvStGoFNJfXw51wpKKFUzphE7NfiabVyv8Sw/9DsSDUFAEpGrgTv6YaSszonoVe7KZv2GU9s7TX2u7DudtiY2pCZdhtjru4svDzMCCoKFNy2UHBBnQelJBtn53Ad2EMuuJlQDBF4Yd/ECQQDmTz0S8gxltHofZOrpwtGmATPoLfktKjtKOeKmgEHfGyhdHm9yzV8ZFkGYcamOMnHv+QgrcNtbLpUD6onkFyXpAkEA4smhl+EtLXMUWI9SB87XZtD4r8fNtw23nt0vVKiEwQ0sX9DhK5XvYxQyVEF4Lu+pAkC2AeJErAZdEYJ0CAjRjwJAUJdHwtpqViiaV2QEA/rFS/a9yDBWMmTFzIqG8kaNRloFfNhKnXyaG3g7SfH0KCskzZlyL2lViQm64VzwFZ24CQJBANgubCNjOrWAZXyl4gQfX6VavjSRub8tDEQbg+qnWSTNcedELeBmZHOF5RP79JyJSAoltVnGXr+8sSrnt8OQ5HECQQC95nS5q2mMUwfoG/jdzRXyU2tzZMiyyAvVXwMOaAOQK41MnfqAvU/L8c/ZhxsWP61VryxNXso1o5J8S3xQSC/+";

    public static string java_private_key = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMwHWYImSTdqmH4qklg+1RNf2BFXDR0I7v8cc/RaNMlPsW8RtJuzN5mjyHTFDWrITHcXysk+7jNULuNNcEuiN/a/y+htv8Ossi5YturQ+OJKWeglrLLzDPjoRigvoLbykJlmY/B0zN2MBMwOiSBumi9HiqlbReIINVhQ77nGKWYnAgMBAAECgYBpygHKLwnVlwq8mFxLL0ESC6cfzpA5FtG9K0agU0l9fDnXCkooVTOmETs1+JptXK/xLD/0OxINQUASkauBO/phpKzOiehV7spm/YZT2ztNfa7sO522JjakJl2G2Ou7iy8PMwIKgoU3LZQcEGdB6UkG2fncB3YQy64mVAMEXhh38QJBAOZPPRLyDGW0eh9k6unC0aYBM+gt+S0qO0o54qaAQd8bKF0eb3LNXxkWQZhxqY4yce/5CCtw21sulQPqieQXJekCQQDiyaGX4S0tcxRYj1IHztdm0Pivx823Dbee3S9UqITBDSxf0OErle9jFDJUQXgu76kCQLYB4kSsBl0RgnQICNGPAkBQl0fC2mpWKJpXZAQD+sVL9r3IMFYyZMXMiobyRo1GWgV82EqdfJobeDtJ8fQoKyTNmXIvaVWJCbrhXPAVnbgJAkEA2C5sI2M6tYBlfKXiBB9fpVq+NJG5vy0MRBuD6qdZJM1x50Qt4GZkc4XlE/v0nIlICiW1WcZev7yxKue3w5DkcQJBAL3mdLmraYxTB+gb+N3NFfJTa3NkyLLIC9VfAw5oA5ArjUyd+oC9T8vxz9mHGxY/rVWvLE1eyjWjknxLfFBIL/4=";

    //支付宝的公钥，查看地址：https://b.alipay.com/order/pidAndKey.htm 
    public static string alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";

    //支付宝的公钥，查看地址：https://b.alipay.com/order/pidAndKey.htm 
    public static string rsa2_alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3xuoOcu4VToKIAj/e9F/eoOtW5oF/W3HA8kubboK0EZpHVXu3anPgbTIxjhsrkWsFYtbhLzONOZTHSZrfSvmT1Kq+agx+UT7HzYFRFYJClV5oOxtZypx/pvmTav7P4u4dCPvop3jS8ywy+YR0oLoW1I+lt4toxcq7/cneqBBr9jegN7CsEO1QOOT4Gvp1G3olNwcCzNp+sphsH6dstmTo1f14Wd0xnQcCrwGYjPcqRTywTmHsrLZFe2VPVXTNuWwIo+rTMgb8WnUbrmvBc45SU97jYixIcKHDWbVIidQ7GWocpf+T4uYRy9TRvoFrhoDSMgaPUADMIgcharyk4J5iwIDAQAB";

    public static string rsa2_private_key = "MIIEpAIBAAKCAQEAg6hMRTZ1j74Q0QKn68H8SMbzTHw6E/4rhqd3skiSBWj8Eq585xSamCXrLnRjPpBsJMuvA0wFQcYYvbptHRHMSmrWRPa7LywgLt5kUYg5ipZkJPlncix0Yf9+j/CUmohb7V3FdzZSOe0M9GwKZy/+b3Q+DL9jmFX14E3r6U+43FaPZDoL3dbjU3lhDHSDcPvIR3JewaJEdI0C6hbLMcYvKZ1qaxDTBly+TOjOIJjxrQsjhc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NLlNTZdNxy98jJz+lKH7zTDWxfy285HxV61MRIG9iCkMoM1mJEoQiYpyr8bJh2Rvgvkp0y47W8xX1GQKBgQCHkQRREe7YXY9x/JK4nFkJiN7k7o5rxnXXEuaa3wAbrNXScoBbR6P1+1VE92dIwtumFgKEgmV1/T8mPXa2zg32MQgqnu7SCOpwBT+JX4HvHJwu+12l043G+T44QnO7T7BFJ9knhz0ZG3tYdBIYgBajmSW3KqriHExKkf/1t2UgOA==";

    // 服务器异步通知页面路径，需http://格式的完整路径，不能加?id=123这类自定义参数,必须外网可以正常访问
    public static string notify_url = "http://115.29.37.169:8080/AlipayInterFace/NotifyHandler.ashx";

    // 手机端服务器异步通知页面路径，需http://格式的完整路径，不能加?id=123这类自定义参数,必须外网可以正常访问
    public static string appnotify_url = "http://115.29.37.169:8080/AlipayInterFace/AppNotifyHandler.ashx";

    // 页面跳转同步通知页面路径，需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static string return_url = "http://115.29.37.169:8080/AlipayInterFace/ReturnHandler.ashx";

    // 页面跳转同步通知页面路径，需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static string shop_return_url = "http://115.29.37.169:8080/html/paysuccess.html";

    // 页面跳转同步通知页面路径，需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static string recharge_return_url = "http://115.29.37.169:8080/html/alipaysuccess.html";

    // 签名方式
    public static string sign_type = "RSA";

    // 签名方式
    public static string rsa2_sign_type = "RSA2";

    // 调试用，创建TXT日志文件夹路径，见AlipayCore.cs类中的LogResult(string sWord)打印方法。
    public static string log_path = HttpRuntime.AppDomainAppPath.ToString() + "log\\";

    // 字符编码格式 目前支持 gbk 或 utf-8
    public static string input_charset = "utf-8";

    // 支付类型 ，无需修改
    public static string payment_type = "1";

    // 调用的接口名，无需修改
    public static string service = "create_direct_pay_by_user";

    //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑


    //↓↓↓↓↓↓↓↓↓↓请在这里配置防钓鱼信息，如果没开通防钓鱼功能，请忽视不要填写 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    //防钓鱼时间戳  若要使用请调用类文件submit中的Query_timestamp函数
    public static string anti_phishing_key = "";

    //客户端的IP地址 非局域网的外网IP地址，如：221.0.0.1
    public static string exter_invoke_ip = "";

    //↑↑↑↑↑↑↑↑↑↑请在这里配置防钓鱼信息，如果没开通防钓鱼功能，请忽视不要填写 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

}